#include "PrezenterServer.h"

void CordinatorAddresRet::serialize(std::stringstream &ss)
{
	Message::serialize(ss);
	cordinatorInfo.serialize(ss);
}

void CordinatorAddresRet::deSerialize(std::stringstream & ss)
{
	Message::deSerialize(ss);
	cordinatorInfo.deSerialize(ss);
}

void NumberOfTasksRet::serialize(std::stringstream & ss)
{
	Message::serialize(ss);
	ss<<serverList.size()<<" ";
	std::list<ServerFullInfo>::iterator it;
	it = serverList.begin();
	
	for(; it!=serverList.end(); it ++)
	{
		it->serialize(ss);
	}
}

void NumberOfTasksRet::deSerialize(std::stringstream & ss)
{
	Message::deSerialize(ss);
	int listSize;
	ss>>listSize;
	ServerFullInfo servFI;
	for(int i = 0; i < listSize; i++ )
	{
		servFI.deSerialize(ss);
		serverList.push_front(servFI);
	}
}